﻿@using InnovaApp.Layers.ResourcesLayer.Properties
@model InnovaApp.Layers.SecurityLayer.Models.AccountModels.RegisterModel
@section featured {
	<section class="featured">
		<div class="content-wrapper">
			<hgroup class="title">
				<h1>@Model._PageTitle</h1><br />
				<h2>@Model._PageMessage</h2>
			</hgroup>
			<p class="message-info">
				Passwords must be at least @Membership.MinRequiredPasswordLength characters long.
			</p>
		</div>
	</section>
}
@using (Ajax.BeginForm(new AjaxOptions() { HttpMethod = "Post", OnSuccess = "$.fn.MainAjaxSuccess", OnFailure = "$.fn.MainAjaxFailure" }))
{
	<fieldset>
		<legend>Registration Form</legend>
		<ol>
			<li>
				@Html.LabelFor(m => m.UserToRegister.Username)
				@Html.TextBoxFor(m => m.UserToRegister.Username)
				@Html.ValidationMessageFor(m => m.UserToRegister.Username)
			</li>
			<li>
				@Html.LabelFor(m => m.UserToRegister.Email)
				@Html.TextBoxFor(m => m.UserToRegister.Email)
				@Html.ValidationMessageFor(m => m.UserToRegister.Email)
			</li>
			<li>
				@Html.LabelFor(m => m.UserToRegister.Password)
				@Html.PasswordFor(m => m.UserToRegister.Password)
				@Html.ValidationMessageFor(m => m.UserToRegister.Password)
			</li>
			<li>
				@Html.LabelFor(m => m.UserToRegister.ConfirmPassword)
				@Html.PasswordFor(m => m.UserToRegister.ConfirmPassword)
				@Html.ValidationMessageFor(m => m.UserToRegister.ConfirmPassword)
			</li>
		</ol>
		<input type="submit" value="Register" id="cmdSubmit" />
	</fieldset>
}
@if (Model.InvolvedCode != null)
{
    if (Model.InvolvedCode.Count > 0)
    { 
    <section>
        <span class="involvedCode">@Resources.Views_All_InvolvedCode</span>
        <div id="divInvolvedCode">
            @Html.Partial("_InvolvedCode", Model.InvolvedCode)
        </div>
    </section>
    }
}